/**
 * 将样式配置，结果维度数据映射关系，数据转换为echart的options
 * @param style
 * @param relativeConfig
 * @param data
 */
function template(style,relativeConfig,data){



    let xKey = relativeConfig.x['columnField'];

    let dataKeys = relativeConfig.data;

    let xValues = [];

    let series=[];

    for(let index in dataKeys){

        series.push({
            field:dataKeys[index]['columnField'],
            name:dataKeys[index]['columnDesc'],
            type:'line',
            data:[]
        });
    }

    for( let index in data){

        let dataitem = data[index];

        xValues.push(dataitem[xKey]);

        for(let sindex in series){

            let serie = series[sindex];

            serie.data.push(dataitem[serie.field]);
        }

    }


    let option = {
        xAxis: {
            type: 'category',
            data:xValues
        },
        yAxis: {
            type: 'value'
        },
        series: series
    };

    return option;

}